#include <portability/portimpl.h>

#include <x3manager/portability/x3port.h>

#include <x3manager/nonplugin/useplugins.h>

#include <x3manager/objptr.h>
#include <FreeEarth/IFreeEarth.h>
#include <FreeEarthQt/IFreeEarthQt.h>

#include <QApplication>

HMODULE modules[10] = { NULL };

int main(int argc, char *argv[])
{
	QApplication a(argc, argv);

	const char* plugins[] = {
		"x3manager.pln", "FreeEarth.pln", "FreeAnalysis.pln", "FreeEarthQt.pln",NULL
	};

	x3::AutoLoadPlugins autoload(plugins, "");

	x3::Object<IFreeEarthQt> p(clsidFreeEarthQt);

	if (p.valid())
	{
		p->Initialize();
		int nFlag = a.exec();
		p->Uninitialize();
	}

	return 1;
}
